package com.web.mapper;

import com.web.entity.SportRecord;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface SportRecordMapper {
    public List<SportRecord> list(SportRecord sportRecord);

    public SportRecord findById(Integer sportId);

    public void add(SportRecord sportRecord);

    public void update(SportRecord sportRecord);

    public void delete(Integer sportId);

    public List<SportRecord> byUserId(Integer userId);

    public List<SportRecord> byDoctorId(Integer doctorId);


    @MapKey("recordDate")
    public List<Map<String,Object>> findByUserIdAndDate(Integer userId);


    public List<SportRecord> getByUserIdAndDate(SportRecord sportRecord);







}
